package org.xbzheng.jpa.ctrl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import org.xbzheng.jpa.service.UserService;
import org.xbzheng.jpa.bean.User;

import java.util.List;

/**
 * Created by xbzheng on 2018/7/10.
 */
@RestController
public class UserCtrl {
    @Autowired
    private UserService userService;

    @PostMapping("/query")
    public List<User> query(String username){
        return userService.findUser(username);
    }
}
